ser.loc[]
ser.loc[label]
Returns the element of the Series that corresponds to its row label.
- Note:
- Often
ser
comes fromdf.get(column_name)
.
species_ser
- dog_001"dog"
- cat_001"cat"
- cat_002"cat"
- dog_002"dog"
- dog_003"dog"
- ham_001"hamster"
- ham_002"hamster"
- cat_003"cat"
species_ser.loc['dog_002']
'dog'